$(function () {
    var msg_datagrid = $("#msg_datagrid");
    var msg_dialog = $("#msg_dialog");

    //菜单列表初始化
    msg_datagrid.datagrid({
        fit: true,
        url: "/messageHistory/list",
        fitColumns: true,
        pagination: true,
        rownumbers: true,
        striped: true,
        toolbar: "#tb",
        singleSelect: true,
        columns: [[
            {field: "id", title: "编号", hidden: true},
            {field: "intro", title: "短信内容", width: 100},
            {field: "date", title: "发送时间", width: 100}
        ]]
    });
    //end

    //响应函数集合对象
    var cmdObj = {
        //工具栏的刷新
        reload: function () {
            msg_datagrid.datagrid("load");
        }
    };
    //end
    //调用
    $("a[data-cmd]").click(function () {
        var cmd = $(this).data("cmd");
        cmdObj[cmd]();
    })
});


